﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _062
{
    internal class Program
    {
        static void Main(string[] args)
        {
            #region
            /*
            double d = 5673.74;
            int i;
            //将double类型转换为：int
            i = (int)d;
            Console.WriteLine("转换前：{0},转换后：{1}",d,i);

            //将各种类型的数据转换为字符串类型
            int a = 75;
            float e = 53.005f;
            double b = 2345.7652;
            bool c = true;
            Console.WriteLine(a.ToString());
            Console.WriteLine(e.ToString());
            Console.WriteLine(b.ToString());
            Console.WriteLine(c.ToString());
            */
            #endregion
            #region
            /*
            const double pi = 3.14;//定义常量
            double r;
            Console.WriteLine("本程序可以计算圆的面积，请输入一个数字作为圆的半径：");
            r = Convert.ToDouble(Console.ReadLine());
            double area = pi * r * r;
            Console.WriteLine("半径为：{0},圆的面积为：{1}",r,area);
            */
            #endregion
            #region
            /*
            Console.WriteLine("请输入学生考试的成绩(0~100的整数");
            int points = Convert.ToInt32(Console.ReadLine());
            if(points>=60)
            {
                switch (points / 10)
                {
                    case 10:
                        Console.WriteLine("优秀");
                        break;
                    case 9:
                        Console.WriteLine("中上");
                        break;
                    case 8:
                        Console.WriteLine("良好");
                        break;
                    case 7:
                        Console.WriteLine("及格");
                        break;
                    case 6:
                        Console.WriteLine("刚好及格");
                        break;
                    default:
                        Console.WriteLine("不及格");
                        break;
                }
            }
            */
            #endregion
            #region
            /*
            for (int i=1;i<=9;i++)
            {
                Console.Write("{0}", i);
            }
            //输出九九乘法口诀
            for(int i=1;i<=9;i++)
            {
                for(int j=1;j<=i;j++)
                {
                    Console.Write("{0}x{1}\t",j,i,i*j);
                }
                Console.WriteLine();
            }
            for(; ; )
            {
                Console.WriteLine("无线循环");
                break;
            }
            //常用的特殊格式化标志符号
            int a = 123455;
            float f = 11.23f;
            Console.WriteLine("{0:C}",a);//以货币形式
            */
            #endregion

            //全乘
            int a = 0;
            Console.WriteLine("---------------------全乘---------------------");
            for(int i=0;i<10;i++)
            {
                for(int j=1;j<=9;j++)
                {
                    Console.Write("{0}*{1}={2:00}\t", j, i, i * j);
                }
                Console.WriteLine();
            }
            Console.WriteLine("---------------------左下--------------------");
            for(int i=1;i<10;i++)
            {
                for(int j=1;j<=i;j++)
                {
                    Console.Write("{0}*{1}={2:00}\t", j, i, i * j);
                }
                Console.WriteLine();
            }
            Console.ReadKey(); 
}
}
}
